package gold.digger;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC1816 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public String truncateSentence(String s, int k) {
            for (int i = 0; i < s.length(); i++)
                if (s.charAt(i) == ' ' && --k == 0)
                    return s.substring(0, i);
            return s;
        }
    }

    public void run() {
        Solution solution = new Solution();
        List<Integer> list = new ArrayList<>();
        System.out.println(solution.toString());
    }

    public static void main(String[] args) throws Exception {
        LC1816 an = new LC1816();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
